﻿using DAL.Permission.Shop;
using Model.Permission;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BLL.Permission.Shop
{
    public class RoleBLL
    {
        RoleDAL dal = new RoleDAL();

        /// <summary>
        /// 是否存在该记录
        /// </summary>
        public bool Exists(int RoleID, string Name)
        {
            return dal.Exists(RoleID, Name);
        }

        /// <summary>
        /// 是否存在该记录
        /// </summary>
        public bool Exists(string Name)
        {
            return dal.Exists(Name);
        }

        /// <summary>
        /// 增加一条数据
        /// </summary>
        public int Add(RoleEntity model)
        {
            return dal.Add(model);
        }

        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(RoleEntity model)
        {
            return dal.Update(model);
        }

        /// <summary>
        /// 删除一条数据
        /// </summary>
        public bool Delete(int RoleID)
        {

            return dal.Delete(RoleID);
        }
        /// <summary>
        /// 删除一条数据
        /// </summary>
        public bool DeleteList(string RoleIDlist)
        {
            return dal.DeleteList(RoleIDlist);
        }

        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public RoleEntity GetModel(int RoleID)
        {

            return dal.GetModel(RoleID);
        }
    }
}
